//=============================================================================
// Siege Game Replication Info
//=============================================================================
class TFGRI extends UTGameReplicationInfo;

struct FBIndex
{
    var int Index[10];
};

var() float buildcost[12];

var teaminfo team[2];
var float TeamCredits[2];
var FBIndex BuildingIndex[2];
var int BaseShield[2];
var float MaxControl[2];
var float Control[2];

//net traffic
replication
{
	//data server should send to clients
	if ( Role == ROLE_Authority )
		MaxControl, Control, BaseShield, TeamCredits, BuildingIndex, team;
}
//used to add RES to all players on a team
function AddTeamRES(float amount, int t, bool individual)
{
    local int i;
    if(team[t].size > 1)
        amount/=team[t].size;
    for(i=0; i<PRIArray.Length; i++)
 {
        if(PRIArray[i].Team == None)
            continue;
	    if(PRIArray[i].Team.TeamIndex==t)
            tfpri(PRIArray[i]).AddRES(amount);
	}
}
//used to add skill to all players on a team
function AddTeamSkill(float amount, int t, optional bool noXP)
{
    local int i;

    for(i=0; i<PRIArray.Length; i++)
	{
	    if(PRIArray[i].Team.TeamIndex==t)
            tfpri(PRIArray[i]).AddSkill(amount,0,noXP);
	}
}

defaultproperties
{
     buildcost(0)=50.000000
     buildcost(1)=200.000000
     buildcost(2)=200.000000
     buildcost(3)=200.000000
     buildcost(4)=300.000000
     buildcost(5)=600.000000
     buildcost(6)=300.000000
     buildcost(11)=300.000000
     TeamCredits(0)=50.000000
     TeamCredits(1)=50.000000
}